package world3d.world.entities;

import world3d.world.Entity;

import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;

public class LightEntity extends Entity {
	@Override
	public void display() {

	}

	@Override
	public void init(GLAutoDrawable glAutoDrawable) {
		super.init(glAutoDrawable);
		float SHINE_ALL_DIRECTIONS = 1;
		float[] lightPos = {-3, 0, 0, SHINE_ALL_DIRECTIONS};
		float[] lightColorAmbient = {1.2f, 0.2f, 0.2f, 1f};
		float[] lightColorSpecular = {1.8f, 0.8f, 0.8f, 1f};

		gl2.glLightfv(GL2.GL_LIGHT1, GL2.GL_POSITION, lightPos, 0);
		gl2.glLightfv(GL2.GL_LIGHT1, GL2.GL_AMBIENT, lightColorAmbient, 0);
		gl2.glLightfv(GL2.GL_LIGHT1, GL2.GL_SPECULAR, lightColorSpecular, 0);

		gl2.glEnable(GL2.GL_LIGHT1);
		gl2.glEnable(GL2.GL_LIGHTING);
	}

	@Override
	public void dispose() {

	}
}
